{template header}
<style type="text/css">
  .boardDiv{margin-bottom: 10px;}
  .boardList{margin: 10px auto;}
  .boardList li{list-style-type:none;float:left;margin:5px 9px;background-color:#dbeaf9;padding:5px 10px;cursor:pointer;border-radius: 3px;}
  .boardList label{float: left;margin-bottom: 0;}
  .boardList label input {float: left;margin-right: 5px;}
  .tagHot label {display: inline-block;}
</style>
<div class="tagInfo">
  <form enctype="multipart/form-data" method="post" action="index.php?c=admin&a=editTag" class="form-horizontal">
      <div class="control-group">
        <label class="control-label">标签名称：</label>
        <div class="controls">
          <input type="text" name="tagName" placeholder="请输入标签名" value="{$tagInfo['tagName']}">
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">标签作者：</label>
        <div class="controls">
          <input type="text" name="uid" placeholder="请输入标签作者的用户ID" readonly="readonly" value="{$tagInfo['uid']}">
          <span>0表示该标签为系统标签</span>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">添加时间：</label>
        <div class="controls">
         	<input type="text" name="addTime" readonly="readonly" id="starttimeid" value="{eval echo date('Y-m-d H:i:s', $tagInfo['addTime'])}">
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">是否热门：</label>
        <div class="controls tagHot">
          <input type="radio" name="isHot" id="hotTag" {if $tagInfo['isHot'] == '1'} checked="checked"{/if} value="1">&nbsp;<label for="hotTag">热门</label>&nbsp;&nbsp;&nbsp;
          <input type="radio" name="isHot" id="notHot"{if $tagInfo['isHot'] == '0'} checked="checked"{/if} value="0">&nbsp;<label for="notHot">非热门</label>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">所属版块：</label>
        <div class="controls boardDiv">
    		  <ul id="boardList" class="boardList">
    		    {loop $boardList $k $v}
    		      <li><label for="{$v['boardId']}"><input type="checkbox" name="boardId[]" value="$v['boardId']" id="{$v['boardId']}" {if $v['isMem'] == '1'}checked="checked" {/if}>{$v['boardName']}</label></li>
    		    {/loop}
    		  </ul>
    		</div>
      </div>
      <!-- <div class="control-group">
        <label class="control-label">标签颜色：</label>
        <div class="controls">
          <input type="text" name="tagName" placeholder="请输入标签名">
        </div>
      </div> -->
      <div class="control-group">
        <div class="controls">
        	<input type="hidden" name="tagId" value="{$tagInfo['tagId']}">
            {if $action == 'add'}
              <input type="hidden" name="action" value="insert">
            {elseif $action == 'edit'}
              <input type="hidden" name="action" value="update">
            {/if}
            <button type="submit" class="btn">提交</button>
        </div>
      </div>
  </form>
</div>
{template footer}